home *** CD-ROM | disk | FTP | other *** search
- #ifdef THINK_C
- #include "::ShowInitAndName.h"
- #else
- #include "ShowInitAndName.h"
- #endif
-
- /* IMPORTANT: Read "ShowInitAndName.h" first!! */
-
-
-
- #ifdef powerc
- ProcInfoType __procinfo = kThinkCStackBased;
- #endif
-
- void main ( void );
- void WaitFor ( long howLongToWaitInSixtiethsOfASecond );
-
-
-
-
- void main ( void )
- {
- /******************/
- /* */
- /* SIMPLE EXAMPLE */
- /* */
- /******************/
-
- /* As soon as possible after your init is called, be sure to show an icon. */
- ShowInitAndName ( 138, "How Friendly", nil, noErr, false );
-
- WaitFor ( 90 ); /* Pretend to do actual init work here */
-
- /* As the very last thing your init does, show an icon again (this time indicating you’re allDone). */
- ShowInitAndName ( 139, "How Friendly", nil, noErr, true /* <--- allDone */ );
-
- /* That’s it. Was that easy enough? */
- /* For more powerful examples, see the Variety Of Examples ("Loch Ness") folder */
- }
-
-
-
-
-
-
-
-
-
- void WaitFor ( long howLongToWaitInSixtiethsOfASecond )
- {
- /* This causes a pause during startup - to simulate an init installing itself. */
- /* You don’t need this routine in your actual init. */
-
- /* 96/01/11 v1.0.0 David Cook First version */
-
- long timeToFly;
-
-
- timeToFly = TickCount ( ) + howLongToWaitInSixtiethsOfASecond;
-
- while ( timeToFly > TickCount ( ) )
- {
- };
- }